The present invention relates to an asynchronous remote procedure calling in a shared-memory multiprocessor.
Generally, in a computer system, using plural processors, methods of performing parallel processing by a procedure call include a local procedure calling scheme and a remote procedure calling scheme. FIGS. 6 and 7 are conceptual diagrams of the local procedure calling scheme and the remote procedure calling scheme, respectively. As shown in FIG. 6, the local procedure calling scheme is a method of making the procedure call between a first processor 2 and a second processor 3 that are provided in a common machine (computer) 1 and have a shared-memory 4.
This local procedure calling scheme has an advantage in that communication between the processors 2 and 3 can be performed at a high speed. However, since plural processors 2 and 3 use the same memory area, this scheme has a problem in that as the number of processors increases, conflicts in memory access increase memory access latency and improvements in computer processing efficiency become difficult. As this scheme requires a configuration of controlling coherence of a cache, there is also a problem in that this coherence control mechanism becomes complicated as the number of processors increases.
On the other hand, as shown in FIG. 7, the remote procedure calling scheme is a method of making the procedure call between independent machines 5 and 6 by way of a network 7 such as an Ethernet (registered trademark). In this case, a processor 8 in a client machine 5 uses a memory 9 in the client machine 5. A processor 10 in a server machine 6 uses a memory 11 in the server machine 6. Therefore, the remote procedure calling scheme does not cause the problems of increased memory access latency due to conflicts in memory access and a complicated mechanism for controlling the coherence of the cache, as found with the local procedure calling scheme.
Among the remote procedure calling schemes is an asynchronous remote procedure calling scheme. According to this asynchronous remote procedure calling scheme, the processor requesting the procedure (hereinafter, procedure requesting processor) may cause a different processor to execute plural remote procedures simultaneously. Therefore, the procedure requesting processor, upon receipt of a notification indicating completion of the procedure from the processor executing the procedure (hereinafter, procedure executing processor), must identify to which procedure the notification corresponds among the procedures previously requested by the procedure requesting processor.
FIG. 8 is a conceptual diagram of the asynchronous remote procedure calling scheme. As shown in FIG. 8, in the asynchronous remote procedure calling scheme, the procedure requesting processor, namely, the processor 8 in the client machine 5, controls the plural procedures requested of the procedure executing processor, namely, the processor 10 in the server machine 6, by preparing procedure control information 19 with an identifier such as an ID attached thereto for each procedure call. This procedure control information 19 is stored in the memory 9 of the client machine 5.
When the procedure requesting processor makes an asynchronous remote procedure call to the procedure executing processor, the procedure requesting processor informs the procedure executing processor of the ID of corresponding procedure control information 19. The procedure executing processor, upon completion of the requested procedure, returns the ID received at the time of initiation to the procedure requesting processor. The procedure requesting processor, upon return of the ID from the procedure executing processor, performs completion processing and confirms completion.
In the remote procedure calling scheme, in order for the processor 8 in the client machine 5 to make the procedure call to the processor 10 in the server machine 6, the processor 8 in the client machine 5 must specify the address of the corresponding procedure in the memory 11 of the server machine 6. However, since the client machine 5 and the server machine 6 are independent of each other, the processor 8 in the client machine 5 is not capable of knowing the corresponding address in the memory 11 in the server machine 6.
Accordingly, in the conventional remote procedure calling scheme, configuration is such that description about the hardware such as the memory is abstracted and the procedure to be called is specified by an identifier such as an ID number. The situation is the same with the asynchronous remote procedure calling scheme. In this case, such as the address space of the memory 11 in the server machine 6 shown in FIG. 9, it is necessary to prepare, at a data area 12 for a server program, a table indicating correspondence between the addresses of procedures 14, 15, 16, and 17 developed in a program area 13 for the server program and identifiers such as the ID numbers. This leads to a problem in that utilization of the memory 11 in the server machine 6 is increased accordingly.
In the remote procedure calling scheme, inclusive of the asynchronous type, since communication between the machines 5 and 6 is performed using the network 7, the speed of the communication between the processors 8 and 10 is considerably slower as compared with the local procedure calling scheme. Furthermore, on the side of the server machine 6, since it is necessary to search for the address corresponding to the identifier such as the ID number from a table 18, the procedure initiation processing takes time. This causes a problem, as shown in FIG. 10, of a long initiation overhead from the client machine 5 sending the procedure call until the execution of the corresponding procedure at the server machines 6.
Furthermore, in the asynchronous remote procedure calling scheme, when the procedure requesting processor performs the completion processing, the execution status included in the procedure control information 19 must be changed from “being executed” to “completed” using the ID returned by the procedure executing processor. Therefore, at the data area of the memory 9 in the client machine 5, a table indicating correspondence between the address of the procedure control information 19 and the ID must be prepared, leading to a problem in that the utilization of the memory 9 in the client machine 5 is increased accordingly. Furthermore, since it is necessary to search for the address of the procedure control information 19 corresponding to the ID returned by the procedure executing processor, there is a problem in that the completion processing takes time.
The present invention was conceived in light of the above and an object of the present invention is to provide an asynchronous remote procedure calling method in a shared-memory multiprocessor that applies an asynchronous remote procedure calling scheme to communication between plural processors sharing memory and that is capable of reducing memory utilization in a client machine and a server machine and of achieving a higher speed of procedure initiation processing and completion processing. Another object of the present invention is to provide a computer product that causes a computer to execute such an asynchronous remote procedure calling method.